package com.example.service1.common.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.Instant;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class M2 {
    private long id;
    private String name;
    private Integer age;

    public static M2 defaultCreate(){
        M2 m1 = new M2();
        m1.setId(Instant.now().getEpochSecond());
        m1.setName("aaa");
        m1.setAge(123);
        return m1;
    }

    @Override
    public String toString() {
        return "M1{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
